<?php

class Application_Form_modifform extends Zend_Form
{
	
    public function init()
    {
    	
    	$formation = new Zend_Form_Element_Text("Formation");
    	$formation->setLabel("Nom formation  :");
    	/*$formation->setDecorators(array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors',
    			new Zend_Form_Decorator_HtmlTag(array(
    					'tag'   => 'div', "class"=>"control-group"
    			))
    	));*/
    	$formation->addDecorator('Description', array('placement' => 'APPEND'));
    	
    	$tuteur = new Zend_Form_Element_Select("Tuteur");
    	$tuteur->setMultiOptions(array('0'=>'Choisir coordinateur', '1' => 'tuteur2', '2' => 'tuteur3', '3' => 'tuteur4'));
    	$tuteur->setLabel("Coordinateur :");
    	/*$tuteur->setDecorators(array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors',
    			new Zend_Form_Decorator_HtmlTag(array(
    					'tag'   => 'div', "class"=>"control-group"
    			))
    	));*/
    	$type = new Zend_Form_Element_Select("Type");
    	$type->setMultiOptions(array('1' => 'Mastère', '2' => 'Licence', '3' => 'Certificat', '4' => 'Formation transversale'));
    	$type->setLabel("Type :");
    	/*$type->setDecorators(array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors',
    			new Zend_Form_Decorator_HtmlTag(array(
    					'tag'   => 'div', "class"=>"control-group"
    			))
    	));*/
    	
    	$url = new Zend_Form_Element_Text("url");
    	$url->setLabel("URL webservice  :");
    	/*$url->setDecorators(array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors',
    			new Zend_Form_Decorator_HtmlTag(array(
    					'tag'   => 'div', "class"=>"control-group"
    			))
    	));*/
    	$creation = new Zend_Form_Element_Text("creation");
    	$creation->setLabel("Date de création :");
    	$creation->setAttrib('class', 'small');
    	$creation->setAttrib('type', 'text');
    	$creation->setAttrib('id', 'date');
    	$creation->setAttrib('data-datepicker', 'datepicker');
    	$creation->setAttrib('data-date-format', 'dd/mm/yyyy');
    	/*$creation->setDecorators(array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors',
    			new Zend_Form_Decorator_HtmlTag(array(
    					'tag'   => 'div', "class"=>"control-group"
    			))
    	));*/
    	 
    	$this->addElements(array($formation,$tuteur, $type, $url, $creation));
    	$this->setElementDecorators(array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors',
    			new Zend_Form_Decorator_HtmlTag(array(
    					'tag'   => 'div', "class"=>"control-group"
    			))
    	));
    }
}